package com.example.myapplication.serviceview;

import android.content.Intent;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import com.example.myapplication.R;
import com.example.service.TestService;

public class ServiceActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_service);

    }

    public void start(View view) {
        startService(new Intent(this, TestService.class));
    }

    public void stop(View view) {
        stopService(new Intent(this, TestService.class));

    }
}